﻿@{
    ViewBag.Title = "综合报表";
    Layout = "~/Views/Shared/_ManufactureList.cshtml";
}
<link href="~/Content/css/ConsignmentComprehensive_print.css" rel="stylesheet" media="print" />
<style type="text/css">
    .print {
        display: none;
    }

    .tool_c {
        padding: 10px 0;
    }

    .btn-group {
        padding: 0 10px 0 0;
    }


    .grid_list_1_c table tr[id] td:nth-child(2) a {
        margin: 0 0.5em 0 0;
    }


    .btn-group:last-child a.btn:first-child {
        margin: 0 0.5em 0 0 !important;
    }

    .input_inline input {
        display: inline-block;
        width: 4em;
    }

    .date_area input {
        display: inline-block;
        width: 8em !important;
        margin: 0 0.2em;
    }


    .btn-group input[type=text] {
        height: 2em !important;
    }
</style>
<script>
    $(function () {
        Index.init();
    });

    var Index = {
        defaultDate:@Html.Raw(ViewData["LedgerDate"].ToString()),
        printTemplate: null,
        titlies: "{0}分类收发存分类汇总,{0}分类收发存零件汇总,{0}仓库收发综合报表".split(","),
        curUnit: '@ViewData["curUnit"].ToString()',
        curUserName: '@ViewData["curUserName"].ToString()',
        curDate: '@ViewData["curDate"].ToString()',
        curTime: '@ViewData["curTime"].ToString()',
        dataList:{
            "01":null,
            "02":null,
            "1":null
        },
        printItemTemplate: "",
        init: function () {
            with (Index) {
                printItemTemplate = $("#print11 .page").html();

                initControl();

                loadDataList();
            }
        },
        initControl: function () {
            $.renderMy97Datepicker();

            $("[date-control]").val(Index.defaultDate);

            $("[date-control]").on("click", function () {
                WdatePicker({ dateFmt: 'yyyyMM', minDate: '2000-1', maxDate: '2050-12' });
            });

            $('select').bindSelect();

            var show1s = {
                "分类汇总":"i11,i12,i14".split(","),
                "零件汇总":"i11,i13,i15".split(",")
            };

            $("[name=ra1]").on("click",function(){
                var showCur = show1s[$(this).val()];

                $(".i1").hide(0);

                showCur.forEach(function(cur){
                    $(".{0}".format(cur)).show(0);
                });
            });

            $("[name=ra1]:first").trigger("click");
            //零件分类
            $("#FProductionTypeNO1").bindSelect({
                url: "/WareHouse/Consignment/GetFProductionTypies",
                id: "FTypeNO",
                text: "FTypeNOName"
            });
            //批次查询 btn_search1
            $("#btn_search1").on("click", function () {
                var $gridList1=null,conn1="";

                var val = $("[name=ra1]:checked").val();
                
                "分类汇总"==val &&(function(){
                    $gridList1 = $("#gridList11");

                    conn1 = $.buildPostParam("FAccountDate,FProductionTypeNO", "1");
                })();

                "零件汇总"==val &&(function(){
                    $gridList1 = $("#gridList12");

                    conn1 = $.buildPostParam("FAccountDate,FProductionNO", "1");
                })();

                $gridList1.jqGrid('setGridParam', {
                    postData: conn1,
                }).trigger('reloadGrid');
            });
            //打印      
            $("#butnPrint1").on("click", function () {
                var val = $("[name=ra1]:checked").val();

                var print = {};

                "分类汇总"==val &&(function(){
                    print= $("#print11");
                })();

                "零件汇总"==val &&(function(){
                    print= $("#print12");
                })();

                print.jqprint();
            });
            //导出
            $("#butnExport1").on("click", function () {
                var val = $("[name=ra1]:checked").val();

                var param = { id: "", param: null};
                
                "分类汇总"==val &&(function(){
                    param.id = "V_JSK_14_MX_StoLJKListAcco_Mid_Type";

                    param.param =  Index.buildExportConn("FAccountDate,FProductionTypeNO".split(","), "1") ;

                    Index.defaultDate != $("#FAccountDate1").val() && (param.id = "V_JSK_16_MX_StoLJKListAcco_Arc_Type");
                })();

                "零件汇总"==val &&(function(){
                    param.id = "V_JSK_14_MX_StoLJKListAcco_Mid_LJ";

                    param.param =  Index.buildExportConn("FAccountDate,FProductionNO".split(","), "1") ;

                    Index.defaultDate != $("#FAccountDate1").val() && (param.id = "V_JSK_16_MX_StoLJKListAcco_Arc_LJ");
                })();

                var url = "/Common/ExcelExportById?{0}".format($.param(param));

                location.href = url;
            });

            $("#butnPrint2").on("click", function () {
                $("#print2").jqprint();
            });
            //导出
            $("#butnExport2").on("click", function () {
                var param = { id: "V_JSK_23_BB_StoProStockCata_RB", param: Index.buildExportConn("FAccountDate,FHappenCompanyNO,FContainerNO".split(","), "1") };

                var url = "/Common/ExcelExportById?{0}".format($.param(param));

                location.href = url;
            });
            //批次查询 btn_search2
            $("#btn_search2").on("click", function () {
                var $gridList2 = $("#gridList2");

                var conn2 = $.buildPostParam("FAccountDate,FProductionNO", "2");

                $gridList2.jqGrid('setGridParam', {
                    postData: conn2,
                }).trigger('reloadGrid');
            });
            
        },
        buildExportConn: function (params, num) {
            var conn = "";

            !num && (num = "");

            params.forEach(function (item) {
                var val = $("#{0}{1}".format(item, num)).val();

                !!val && (conn += ("and {0} = '{1}'".format(item, val)));
            });

            return conn;
        },
        loadDataList: function () {
            var conn11 = $.buildPostParam("FAccountDate,FProductionTypeNO", "1");

            var $gridList11 = $("#gridList11");

            $gridList11.dataGridForJson({
                url: "/WareHouse/Consignment/GetConsignmentCateSum",
                postData: conn11,
                height: $(window).height() - 240,
                colModel: [
                { label: '使用单位(隐藏)', name: 'UseUnit', width: 120, align: 'left', sortable: false,hidden:true},
                { label: '使用单位', name: 'UseUnitName', width: 180, align: 'left', sortable: false },
                { label: '零件分类(隐藏)', name: 'FProductionTypeNO', width: 100, align: 'left', sortable: false,hidden:true },
                { label: '零件分类', name: 'FProductionTypeName', width: 140, align: 'left', sortable: false},
                 { label: '期初<br/>库存', name: 'FQuantity_QC', width: 60, align: 'right'},
                 { label: '期初<br/>金额', name: 'FMoney_QC', width: 60, align: 'left', sortable: false, formatter: 'number'},
                { label: '入库<br/>数量', name: 'FQuantity_RK', width: 60, align: 'left', sortable: false },
                { label: '入库<br/>金额', name: 'FMoney_RK', width: 60, align: 'right', sortable: false, formatter: 'number' },
                { label: '出库<br/>数量', name: 'FQuantity_CK', width: 60, align: 'right', sortable: false},
                 { label: '出库<br/>金额', name: 'FMoney_CK', width: 60, align: 'right', sortable: false, formatter: 'number'},
                { label: '废品<br/>数量', name: 'FQuantity_BS', width: 60, align: 'right', sortable: false},
                 { label: '废品<br/>金额', name: 'FMoney_BS', width: 60, align: 'right', formatter: 'number'},
                 { label: '盈亏<br/>数量', name: 'FQuantity_PC', width: 60, align: 'right', sortable: false},
                { label: '盈亏<br/>金额', name: 'FMoney_PC', width: 60, align: 'right', sortable: false , formatter: 'number'},
                { label: '期末<br/>库存	', name: 'FQuantity_JC', width: 60, align: 'right', sortable: false},
                { label: '期末<br/>金额', name: 'FMoney_JC', width: 60, align: 'right', sortable: false, formatter: 'number' },
                { label: '', name: '', width: $(window).width() - 1100, align: 'left' }
                ],
                pager: "#gridPager11",
                sortname: 'UseUnit,FProductionTypeNO',
                sortorder: "asc,asc",
                viewrecords: true,
                rownumWidth: 50,
                onSelectRow: function (rowId) {

                },
                loadComplete: function (data) {
                    Index.dataList["01"] = data.rows;

                    var columnInfo = [
                              { caption: '使用单位', name: 'UseUnitName'},
                              { caption: '零件分类', name: 'FProductionTypeName'},
                              { caption: '期初库存', name: 'FQuantity_QC'},
                              { caption: '期初金额', name: 'FMoney_QC'},
                              { caption: '入库数量', name: 'FQuantity_RK'},
                              { caption: '入库金额', name: 'FMoney_RK'},
                              { caption: '出库数量', name: 'FQuantity_CK'},
                              { caption: '出库金额', name: 'FMoney_CK'},
                              { caption: '废品数量', name: 'FQuantity_BS'},
                              { caption: '废品金额', name: 'FMoney_BS'},
                              { caption: '盈亏数量', name: 'FQuantity_PC'},
                              { caption: '盈亏金额', name: 'FMoney_PC'},
                               { caption: '期末库存', name: 'FQuantity_JC'},
                              { caption: '期末金额', name: 'FMoney_JC'}
                    ];

                    var title = Index.titlies[0].format(new Date().format("yyyy年MM月"))

                    Index.renderPrintData($("#print11"), data.rows, columnInfo, title);
                }
            });

            $gridList11.jqGrid('setFrozenColumns');

            $gridList11.jqGrid('setLabel', 0, '序号', 'rowNumberHeaderStyle');

            var conn12 = $.buildPostParam("FAccountDate,FProductionNO", "1");

            var $gridList12 = $("#gridList12");

            $gridList12.dataGridForJson({
                url: "/WareHouse/Consignment/GetConsignmentPartsSum",
                postData: conn12,
                height: $(window).height() - 240,
                colModel: [
                { label: '使用单位(隐藏)', name: 'UseUnit', width: 120, align: 'left', sortable: false,hidden:true},
                { label: '使用单位', name: 'UseUnitName', width: 180, align: 'left', sortable: false },
                { label: '零件分类(隐藏)', name: 'FProductionNO', width: 100, align: 'left', sortable: false,hidden:true },
                { label: '零件分类', name: 'FProductionName', width: 140, align: 'left', sortable: false},
                { label: '零件分类(隐藏)', name: 'FProductionTypeNO', width: 100, align: 'left', sortable: false,hidden:true },
                { label: '零件分类', name: 'FProductionTypeName', width: 140, align: 'left', sortable: false},
               { label: '期初<br/>库存', name: 'FQuantity_QC', width: 60, align: 'right'},
                 { label: '期初<br/>金额', name: 'FMoney_QC', width: 60, align: 'left', sortable: false, formatter: 'number'},
                { label: '入库<br/>数量', name: 'FQuantity_RK', width: 60, align: 'left', sortable: false },
                { label: '入库<br/>金额', name: 'FMoney_RK', width: 60, align: 'right', sortable: false, formatter: 'number'},
                { label: '出库<br/>数量', name: 'FQuantity_CK', width: 60, align: 'right', sortable: false},
                 { label: '出库<br/>金额', name: 'FMoney_CK', width: 60, align: 'right', sortable: false, formatter: 'number'},
                { label: '废品<br/>数量', name: 'FQuantity_BS', width: 60, align: 'right', sortable: false},
                 { label: '废品<br/>金额', name: 'FMoney_BS', width: 60, align: 'right', formatter: 'number'},
                 { label: '盈亏<br/>数量', name: 'FQuantity_PC', width: 60, align: 'right', sortable: false},
                { label: '盈亏<br/>金额', name: 'FMoney_PC', width: 60, align: 'right', sortable: false , formatter: 'number'},
                { label: '期末<br/>库存	', name: 'FQuantity_JC', width: 60, align: 'right', sortable: false},
                { label: '期末<br/>金额', name: 'FMoney_JC', width: 60, align: 'right', sortable: false, formatter: 'number'},
                 { label: '制造单位(隐藏)', name: 'FProCompanyNO', width: 100, align: 'left', sortable: false,hidden:true },
                { label: '制造单位', name: 'FProCompanyName', width: 140, align: 'left', sortable: false},
                { label: '', name: '', width: $(window).width() - 1390, align: 'left' }

                ],
                pager: "#gridPager12",
                sortname: 'UseUnit,FProductionNO',
                sortorder: "asc",
                viewrecords: true,
                rownumWidth: 50,
                onSelectRow: function (rowId) {

                },
                loadComplete: function (data) {
                    Index.dataList["02"] = data.rows;

                    var columnInfo = [
                              { caption: '使用单位', name: 'UseUnitName'},
                               { caption: '零件名称', name: 'FProductionName'},
                               { caption: '零件分类', name: 'FProductionTypeName'},
                              { caption: '期初库存', name: 'FQuantity_QC'},
                              { caption: '期初金额', name: 'FMoney_QC'},
                              { caption: '入库数量', name: 'FQuantity_RK'},
                              { caption: '入库金额', name: 'FMoney_RK'},
                              { caption: '出库数量', name: 'FQuantity_CK'},
                              { caption: '出库金额', name: 'FMoney_CK'},
                              { caption: '废品数量', name: 'FQuantity_BS'},
                              { caption: '废品金额', name: 'FMoney_BS'},
                              { caption: '盈亏数量', name: 'FQuantity_PC'},
                              { caption: '盈亏金额', name: 'FMoney_PC'},
                               { caption: '期末库存', name: 'FQuantity_JC'},
                              { caption: '期末金额', name: 'FMoney_JC'},
                              { caption: '制造单位', name: 'FProCompanyName'}
                    ];

                    var title = Index.titlies[1].format(new Date().format("yyyy年MM月"))

                    Index.renderPrintData($("#print12"), data.rows, columnInfo, title);
                }
            });

            $gridList12.jqGrid('setFrozenColumns');

            $gridList12.jqGrid('setLabel', 0, '序号', 'rowNumberHeaderStyle');
            
            var conn2 = $.buildPostParam("FAccountDate,FProductionNO", "2");

            var $gridList2 = $("#gridList2");

            $gridList2.dataGridForJson({
                url: "/WareHouse/Consignment/GetConsignmentreceiveAndDispatch",
                postData: conn2,
                height: $(window).height() - 240,
                colModel: [
                { label: '使用单位(隐藏)', name: 'UseUnit', width: 120, align: 'left', sortable: false,hidden:true},
                { label: '使用单位', name: 'UseUnitName', width: 160, align: 'left', sortable: false },
                { label: '零件编号', name: 'FProductionNO', width: 120, align: 'left', sortable: false },
                { label: '零件名称', name: 'FProductionName', width: 160, align: 'left', sortable: false},
                { label: '库存<br/>数量', name: 'JCSL', width: 60, align: 'right', sortable: false },
                { label: '期初<br/>数量', name: 'QCSL', width: 60, align: 'right', sortable: false },
                { label: '01入库', name: 'RK01', width: 60, align: 'right', sortable: false },
                { label: '02入库', name: 'RK02', width: 60, align: 'right', sortable: false},
                { label: '03入库', name: 'RK03', width: 60, align: 'right', sortable: false },
                { label: '04入库', name: 'RK04', width: 60, align: 'right', sortable: false },
                { label: '05入库', name: 'RK05', width: 60, align: 'right', sortable: false },
                { label: '06入库', name: 'RK06', width: 60, align: 'right', sortable: false},
                { label: '07入库', name: 'RK07', width: 60, align: 'right', sortable: false },
                { label: '08入库', name: 'RK08', width: 60, align: 'right', sortable: false },
                { label: '09入库', name: 'RK08', width: 60, align: 'right', sortable: false },
                { label: '10入库', name: 'RK10', width: 60, align: 'right', sortable: false},
                { label: '11入库', name: 'RK11', width: 60, align: 'right', sortable: false },
                { label: '12入库', name: 'RK12', width: 60, align: 'right', sortable: false },
                { label: '13入库', name: 'RK13', width: 60, align: 'right', sortable: false },
                { label: '14入库', name: 'RK14', width: 60, align: 'right', sortable: false},
                { label: '15入库', name: 'RK15', width: 60, align: 'right', sortable: false },
                { label: '16入库', name: 'RK16', width: 60, align: 'right', sortable: false },
                { label: '17入库', name: 'RK17', width: 60, align: 'right', sortable: false },
                { label: '18入库', name: 'RK18', width: 60, align: 'right', sortable: false},
                { label: '19入库', name: 'RK19', width: 60, align: 'right', sortable: false },
                { label: '20入库', name: 'RK20', width: 60, align: 'right', sortable: false },
                { label: '21入库', name: 'RK21', width: 60, align: 'right', sortable: false },
                { label: '22入库', name: 'RK22', width: 60, align: 'right', sortable: false},
                { label: '23入库', name: 'RK23', width: 60, align: 'right', sortable: false },
                { label: '24入库', name: 'RK24', width: 60, align: 'right', sortable: false },
                { label: '25入库', name: 'RK25', width: 60, align: 'right', sortable: false },
                { label: '26入库', name: 'RK26', width: 60, align: 'right', sortable: false},
                { label: '27入库', name: 'RK27', width: 60, align: 'right', sortable: false },
                { label: '28入库', name: 'RK28', width: 60, align: 'right', sortable: false },
                { label: '29入库', name: 'RK29', width: 60, align: 'right', sortable: false },
                { label: '30入库', name: 'RK30', width: 60, align: 'right', sortable: false},
                { label: '31入库', name: 'RK31', width: 60, align: 'right', sortable: false },
                { label: '当月入库<br/>数量合计', name: 'RKHZ', width: 60, align: 'right', sortable: false },
                { label: '入库合计<br/>含期初数', name: 'RKHZ_QCSL', width: 60, align: 'right', sortable: false},
                { label: '01出库', name: 'CK01', width: 60, align: 'right', sortable: false },
                { label: '02出库', name: 'CK02', width: 60, align: 'right', sortable: false},
                { label: '03出库', name: 'CK03', width: 60, align: 'right', sortable: false },
                { label: '04出库', name: 'CK04', width: 60, align: 'right', sortable: false },
                { label: '05出库', name: 'CK05', width: 60, align: 'right', sortable: false },
                { label: '06出库', name: 'CK06', width: 60, align: 'right', sortable: false},
                { label: '07出库', name: 'CK07', width: 60, align: 'right', sortable: false },
                { label: '08出库', name: 'CK08', width: 60, align: 'right', sortable: false },
                { label: '09出库', name: 'CK08', width: 60, align: 'right', sortable: false },
                { label: '10出库', name: 'CK10', width: 60, align: 'right', sortable: false},
                { label: '11出库', name: 'CK11', width: 60, align: 'right', sortable: false },
                { label: '12出库', name: 'CK12', width: 60, align: 'right', sortable: false },
                { label: '13出库', name: 'CK13', width: 60, align: 'right', sortable: false },
                { label: '14出库', name: 'CK14', width: 60, align: 'right', sortable: false},
                { label: '15出库', name: 'CK15', width: 60, align: 'right', sortable: false },
                { label: '16出库', name: 'CK16', width: 60, align: 'right', sortable: false },
                { label: '17出库', name: 'CK17', width: 60, align: 'right', sortable: false },
                { label: '18出库', name: 'CK18', width: 60, align: 'right', sortable: false},
                { label: '19出库', name: 'CK19', width: 60, align: 'right', sortable: false },
                { label: '20出库', name: 'CK20', width: 60, align: 'right', sortable: false },
                { label: '21出库', name: 'CK21', width: 60, align: 'right', sortable: false },
                { label: '22出库', name: 'CK22', width: 60, align: 'right', sortable: false},
                { label: '23出库', name: 'CK23', width: 60, align: 'right', sortable: false },
                { label: '24出库', name: 'CK24', width: 60, align: 'right', sortable: false },
                { label: '25出库', name: 'CK25', width: 60, align: 'right', sortable: false },
                { label: '26出库', name: 'CK26', width: 60, align: 'right', sortable: false},
                { label: '27出库', name: 'CK27', width: 60, align: 'right', sortable: false },
                { label: '28出库', name: 'CK28', width: 60, align: 'right', sortable: false },
                { label: '29出库', name: 'CK29', width: 60, align: 'right', sortable: false },
                { label: '30出库', name: 'CK30', width: 60, align: 'right', sortable: false},
                { label: '31出库', name: 'CK31', width: 60, align: 'right', sortable: false },
                { label: '当月出库<br/>数量合计', name: 'CKHZ', width: 60, align: 'right', sortable: false },
                { label: '报废数量', name: 'FPSL', width: 60, align: 'right', sortable: false },
                { label: '盘点数量', name: 'pcsl', width: 60, align: 'right', sortable: false },
                { label: '制造单位(隐藏)', name: 'FProCompanyNO', width: 100, align: 'left', sortable: false,hidden:true},
                { label: '制造单位', name: 'FProCompanyName', width: 160, align: 'left', sortable: false },
                { label: '零件分类(隐藏)', name: 'FProductionTypeNO', width: 100, align: 'left', sortable: false,hidden:true},
                { label: '零件分类', name: 'FProductionTypeName', width: 160, align: 'left', sortable: false },
                ],
                pager: "#gridPager2",
                sortname: 'UseUnit,FAccountDate,FProductionNO',
                sortorder: "asc,asc,asc",
                viewrecords: true,
                rownumWidth: 50,
                onSelectRow: function (rowId) {

                },
                loadComplete: function (data) {
                    Index.dataList["1"] = data.rows;
                }
            });

            $gridList2.jqGrid('setFrozenColumns');

            $gridList2.jqGrid('setLabel', 0, '序号', 'rowNumberHeaderStyle');
        },
        renderPrintData: function (c, data, colunmInfo, title) {
            c.empty();

            var rows = 16;

            var max = data.length;

            var item = { page: 1, maxPage: 1, title: title, unit: Index.curUnit, user: Index.curUserName, date: Index.curDate, time: Index.curTime, table: null };

            var maxPage = Math.ceil(max / rows);

            item.maxPage = maxPage;

            for (var i = 0; i < maxPage; i++) {
                var isFirst = true;

                var start = i * rows, end = (i + 1) * rows;

                end > max && (end = max);

                var table = $("<table>"), pageItem = $("<div>").addClass("page");

                item.page = i + 1;

                for (var j = start; j < end; j++) {
                    var cur = data[j];

                    isFirst && (function () {
                        var title = $("<tr>");

                        for (var idx in colunmInfo) {
                            $("<th>").html(colunmInfo[idx].caption).appendTo(title);
                        }

                        title.appendTo(table);

                        isFirst = false;
                    })();

                    !isFirst && (function () {
                        var row = $("<tr>");

                        for (var idx in colunmInfo) {
                            $("<td>").text(cur[colunmInfo[idx].name]).appendTo(row);
                        }

                        row.appendTo(table);
                    })();
                }

                item.table = "<table>{0}</table>".format(table.html());

                pageItem.html(Index.printItemTemplate.format(item)).appendTo(c);
            }
        }
    };
</script>



<div class="layout" id="layout" style="width: 100%;">
    <ul id="myTab" class="nav nav-tabs" style="margin: 5px 0 0 0">
        <li class="active"><a href="#tab1" data-toggle="tab">分类收发存报表</a></li>
        <li><a href="#tab2" data-toggle="tab">仓库收发综合报表</a></li>
    </ul>
    <div id="myTabContent" class="tab-content">
        <div class="tab-pane fade in active" id="tab1">
            <div class="tool_c">
                <div class="btn-group  input-width-185">
                    <input name="ra1" id="ra11" type="radio" value="分类汇总" /><label for="ra11">分类汇总</label><br />
                    <input name="ra1" id="ra12" type="radio" value="零件汇总" /><label for="ra12">零件汇总</label>
                </div>
                <div class="btn-group  input-width-185 i1 i11">
                    &nbsp;台账日期<br />
                    <input id="FAccountDate1" name="date" type="text" class="txt_common form-control" date-control />
                </div>
                <div class="btn-group input-width-185 i1 i12">
                    &nbsp;	零件分类<br />
                    <select id="FProductionTypeNO1" name="" class="form-control">
                        <option value="">==请选择==</option>
                    </select>
                </div>
                <div class="btn-group input-width-185 i1 i13">
                    &nbsp;	零件编号<br />
                    <input id="FProductionNO1" name="date" type="text" class="txt_common form-control" />
                </div>
                <div class="btn-group">
                    <a id="btn_search1" class="btn btn-primary center-block"><span class="glyphicon glyphicon-search"></span>查询</a>
                    <a class="btn btn-primary center-block" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span>&nbsp刷新</a>
                    <a id="butnPrint1" class="btn btn-primary center-block"><span class="glyphicon glyphicon-print"></span>&nbsp打印</a>
                    <a id="butnExport1" class="btn btn-primary center-block"><span class="glyphicon glyphicon-download"></span>&nbsp导出</a>
                </div>
            </div>
            <div class="grid_list_1_c i1 i14" style="margin-top: 5px;">
                <table id="gridList11"></table>
                <div id="gridPager11"></div>
            </div>
            <div class="grid_list_1_c i1 i15" style="margin-top: 5px;">
                <table id="gridList12"></table>
                <div id="gridPager12"></div>
            </div>
            <div id="print11" class="print">
                <div class="page break_page">
                    <h1>{title}</h1>
                    <div class="top">
                        单位：<div class="unit">{unit}</div>
                        <div class="right_page">第{page}页，共{maxPage}页</div>
                    </div>
                    <div class="table_c">
                        {table}
                    </div>
                    <footer>
                        <span>打印人员：<label>{user}</label></span> <span>打印日期：<label>{date}</label><label>{time}</label></span>
                    </footer>
                </div>
            </div>
            <div id="print12" class="print">
                <div class="page break_page">
                    <h1>{title}</h1>
                    <div class="top">
                        单位：<div class="unit">{unit}</div>
                        <div class="right_page">第{page}页，共{maxPage}页</div>
                    </div>
                    <div class="table_c">
                        {table}
                    </div>
                    <footer>
                        <span>打印人员：<label>{user}</label></span> <span>打印日期：<label>{date}</label><label>{time}</label></span>
                    </footer>
                </div>
            </div>
        </div>
        <div class="tab-pane fade" id="tab2">
            <div class="tool_c">
                <div class="btn-group  input-width-185">
                    &nbsp;台账日期<br />
                    <input id="FAccountDate2" name="date" type="text" class="txt_common form-control" date-control />
                </div>
                <div class="btn-group input-width-185">
                    &nbsp;	零件编号<br />
                    <input id="FProductionNO2" name="date" type="text" class="txt_common form-control" />
                </div>
                <div class="btn-group">
                    <a id="btn_search2" class="btn btn-primary center-block"><span class="glyphicon glyphicon-search"></span>查询</a>
                    <a class="btn btn-primary center-block" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span>&nbsp刷新</a>
                    <a id="butnExport2" class="btn btn-primary center-block"><span class="glyphicon glyphicon-download"></span>&nbsp导出</a>
                </div>
            </div>
            <div class="grid_list_1_c" style="margin-top: 5px;">
                <table id="gridList2"></table>
                <div id="gridPager2"></div>
            </div>
        </div>
    </div>
</div>


